// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <functional>
#include <queue>
#include <algorithm>
#include <vector>
#include <utility>

int const maxn = 100007;
long long a[maxn];
long long sum[maxn];
std::vector<std::pair<int, int> > v;
int n, k, m;

int main()
{
	std::ios::sync_with_stdio(false);
	while (std::cin >> n >> k >> m) {
		v.clear(); v.resize(m);
		for (int i = 1; i <= n; i++) std::cin >> a[i];
		sum[0] = 0;
		for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + a[i];
		for (int i = 0; i < m; i++)
			std::cin >> v[i].first >> v[i].second;
		std::sort(v.begin(), v.end());
		std::priority_queue<int, std::vector<int>, std::greater<int> > pq;
		int t = 0;
		long long ans = 0;
		for (int i = 1; i <= n; i++) {
			while (v[t].first <= i && t < m)
				pq.push(v[t++].second);
			while (!pq.empty() && pq.top() < i) pq.pop();
			while ((int)pq.size() > k) pq.pop();
			if ((int)pq.size() >= k) {
				ans = std::max(ans, sum[pq.top()] - sum[i - 1]);
			}
		}
		std::cout << ans << '\n';
	}
}

